package com.wawayaya.bookreader.bean;


import com.wawayaya.util.TLog;


public class KokData implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	public int m_isentenceid;
	public String m_saudiopath = null;
	public int m_iaudiobegin;
	public int m_iaudioend;
	RectSerialIntDouble[] m_rsid = null;
	public BTree<TimeRangeKey, RectSerialBoolean> m_bttimerange = new BTree<TimeRangeKey, RectSerialBoolean>();
	
	public KokData(int isentenceid, String saudiopath, int iaudiobegin, int iaudioend, RectSerialIntDouble[] rsid) {
		m_isentenceid = isentenceid;
		m_saudiopath = saudiopath;
		m_iaudiobegin = iaudiobegin;
		m_iaudioend = iaudioend;
		m_rsid = rsid;
		if(null != m_rsid) {
			int icount = 0;
			for(RectSerialIntDouble item : m_rsid){
				if(null != item && null != item.m_beginend && null != item.m_rc) {
					m_bttimerange.put(new TimeRangeKey(item.m_beginend.m_ival1, item.m_beginend.m_ival2), item.m_rc);
					icount++;
				}
			}
			if(icount != m_rsid.length){
				TLog.log("KokData : KokData : " + icount + " != " + m_rsid.length);
			}
		}
	}

}
